<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="../plugins/city-picker.css">
<script src="../plugins/jquery.min.js"></script><!-- jQuery is required -->
<script src="../plugins/city-picker.data.js"></script>
<script src="../plugins/city-picker.js"></script>
</head>
<body>
<!-- html方式创建组件 -->
	<div style="position: relative;"><!-- container -->
	  <input readonly type="text" data-toggle="city-picker" name="cityName">
	</div>

<hr>
<!-- js方式创建组件 -->
	<div style="position: relative;"><!-- container -->
	  <input id="city-picker1" readonly type="text">
	  <input type="button" id="resetBtn" value="重置">
	  <input type="button" id="initBtn" value="初始化">
	  <script type="text/javascript">
	  	$("#city-picker1").citypicker();
	  	
	  	$("#resetBtn").click(function(){
	  		$("#city-picker1").citypicker("reset");
	  	})
	  	
	  $("#initBtn").click(function(){
  		$("#city-picker1").citypicker("reset");
  		$("#city-picker1").citypicker("destroy");
  		$("#city-picker1").citypicker({
  			province:"北京市",
  			city:"北京市",
  			district:"昌平区"
  		})
  	  })
	  	
	  	
	  </script>
	</div>

</body>
</html>